import java.util.Locale;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ExpandBar;
import org.eclipse.swt.widgets.ExpandItem;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.wb.swt.SWTResourceManager;

import com.ayuku.commons.AyukuDB;
import com.ayuku.commons.SqliteDB;
import com.ayuku.course.report.PegawaiReport;
import com.ayuku.course.ui.coursecategory.ListCategory;
import com.ayuku.course.ui.courselevel.ListCourseLevel;
import com.ayuku.course.ui.coursepackage.ListCoursePackage;
import com.ayuku.course.ui.employee.ListPegawai;
import com.ayuku.course.ui.mentor.ListMentor;
import com.ayuku.course.ui.student.ListStudent;

public class MainWindowCourse extends Shell {

	public static CTabFolder tabFolderMain;
	int i = 0;
	private CTabItem tabListMain;
	public static CTabItem tabFormMain;
	private Label lblBreadCrumb;
	private Label lblStatus1;
	private Label lblStatus2;
	

	/**
	 * Launch the application.
	 * 
	 * @param args
	 */
	public static void main(String args[]) {
		Locale.setDefault(Locale.US);
		try {
			AyukuDB.openDB();
			SqliteDB.openDB();
			Display display = Display.getDefault();
			MainWindowCourse shell = new MainWindowCourse(display);
			shell.setMaximized(true);
			shell.open();
			shell.layout();
			while (!shell.isDisposed()) {
				if (!display.readAndDispatch()) {
					display.sleep();
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the shell.
	 * 
	 * @param display
	 */
	public MainWindowCourse(Display display) {

		super(display, SWT.SHELL_TRIM);
		addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent arg0) {
				SWTResourceManager.dispose();
				System.out.println("App Disposed......");
			}
		});
		setMinimumSize(new Point(800, 550));
		setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		setSize(685, 464);

		System.out.println("Makan nasi...");

		GridLayout gridLayout = new GridLayout(1, false);
		gridLayout.marginRight = 5;
		setLayout(gridLayout);

		ToolBar toolBar = new ToolBar(this, SWT.FLAT | SWT.RIGHT);
		toolBar.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND));
		toolBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false,
				1, 1));

		ToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);
		tltmNewItem.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/page_excel.png"));
		tltmNewItem.setText("Info");

		ToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);
		tltmNewItem_1.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/help.png"));
		tltmNewItem_1.setText("Backup");

		ToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);
		tltmNewItem_2.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/user_suit.png"));
		tltmNewItem_2.setText("About");

		ToolItem tltmNewItem_3 = new ToolItem(toolBar, SWT.NONE);
		tltmNewItem_3.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/zoom.png"));
		tltmNewItem_3.setText("Help");

		Label label = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
		label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1,
				1));

		lblBreadCrumb = new Label(this, SWT.NONE);
		lblBreadCrumb.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblBreadCrumb.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
		lblBreadCrumb.setText("Laporan > keuanga");

		SashForm sashForm = new SashForm(this, SWT.NONE);
		sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
				1));

		ExpandBar expandBar = new ExpandBar(sashForm, SWT.V_SCROLL);
		expandBar.setBackgroundMode(SWT.INHERIT_DEFAULT);
		expandBar.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));

		ExpandItem expandMenuMaster = new ExpandItem(expandBar, SWT.NONE);
		expandMenuMaster.setExpanded(true);
		expandMenuMaster.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/database_add.png"));
		expandMenuMaster.setText("Master Data");

		Composite cmpMenuMaster = new Composite(expandBar, SWT.NONE);
		expandMenuMaster.setControl(cmpMenuMaster);
		expandMenuMaster.setHeight(130);
		GridLayout gl_cmpMenuMaster = new GridLayout(1, false);
		gl_cmpMenuMaster.marginRight = 5;
		gl_cmpMenuMaster.marginLeft = 5;
		gl_cmpMenuMaster.verticalSpacing = 4;
		gl_cmpMenuMaster.marginWidth = 1;
		gl_cmpMenuMaster.marginHeight = 4;
		cmpMenuMaster.setLayout(gl_cmpMenuMaster);

		CLabel lblNewLabel_7 = new CLabel(cmpMenuMaster, SWT.NONE);
		lblNewLabel_7.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/application_form.png"));
		lblNewLabel_7.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				linkCategoryClicked(arg0);
			}
		});

		lblNewLabel_7.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_7.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_7.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_7.setText("Kategori");

		CLabel lblNewLabel_8 = new CLabel(cmpMenuMaster, SWT.NONE);
		lblNewLabel_8.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/application_form.png"));
		lblNewLabel_8.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				showCourseLevel(arg0);
			}
		});
		lblNewLabel_8.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_8.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_8.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_8.setText("Level Kursus");

		CLabel lblNewLabel_9 = new CLabel(cmpMenuMaster, SWT.NONE);
		lblNewLabel_9.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/application_form.png"));
		lblNewLabel_9.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				mnuCourseProductsClicked(arg0);
			}
		});
		lblNewLabel_9.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_9.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_9.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_9.setText("Paket Kursus");

		CLabel lblNewLabel_10 = new CLabel(cmpMenuMaster, SWT.NONE);
		lblNewLabel_10.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/application_form.png"));
		lblNewLabel_10.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				showEmployee(arg0);
			}
		});
		lblNewLabel_10.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_10.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_10.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_10.setText("Pegawai");

		CLabel lblPengajar = new CLabel(cmpMenuMaster, SWT.NONE);
		lblPengajar.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				showMentor(arg0);
			}
		});
		lblPengajar.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/application_form.png"));
		lblPengajar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
				false, 1, 1));
		lblPengajar.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblPengajar.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblPengajar.setText("Pengajar");

		ExpandItem expandMenuTrx = new ExpandItem(expandBar, SWT.NONE);
		expandMenuTrx.setExpanded(true);
		expandMenuTrx.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_acrobat.png"));
		expandMenuTrx.setText("Transaksi");

		Composite cmpMenuTrx = new Composite(expandBar, SWT.NONE);
		expandMenuTrx.setControl(cmpMenuTrx);
		expandMenuTrx.setHeight(60);
		GridLayout gl_cmpMenuTrx = new GridLayout(1, false);
		gl_cmpMenuTrx.marginLeft = 5;
		gl_cmpMenuTrx.marginRight = 5;
		gl_cmpMenuTrx.marginWidth = 1;
		gl_cmpMenuTrx.marginHeight = 1;
		gl_cmpMenuTrx.horizontalSpacing = 1;
		cmpMenuTrx.setLayout(gl_cmpMenuTrx);
		
		CLabel linkSiswa = new CLabel(cmpMenuTrx, SWT.NONE);
		linkSiswa.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		linkSiswa.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				showStudent();
			}
		});
		linkSiswa.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/user_suit.png"));
		linkSiswa.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		linkSiswa.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
		linkSiswa.setText("Siswa");
		
		CLabel linkPesertaKursus = new CLabel(cmpMenuTrx, SWT.NONE);
		linkPesertaKursus.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		linkPesertaKursus.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
		linkPesertaKursus.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/help.png"));
		linkPesertaKursus.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		linkPesertaKursus.setText("Peserta Kursus");

		ExpandItem expandMenuLaporan = new ExpandItem(expandBar, SWT.NONE);
		expandMenuLaporan.setExpanded(true);
		expandMenuLaporan.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_stack.png"));
		expandMenuLaporan.setText("Laporan");
		
		Composite cmpMenuLaporan = new Composite(expandBar, SWT.NONE);
		expandMenuLaporan.setControl(cmpMenuLaporan);
		expandMenuLaporan.setHeight(115);
		GridLayout gl_cmpMenuLaporan = new GridLayout(1, false);
		gl_cmpMenuLaporan.marginRight = 5;
		gl_cmpMenuLaporan.marginLeft = 5;
		gl_cmpMenuLaporan.marginWidth = 1;
		gl_cmpMenuLaporan.marginHeight = 1;
		cmpMenuLaporan.setLayout(gl_cmpMenuLaporan);
		
		CLabel menuLaporanCashFlow = new CLabel(cmpMenuLaporan, SWT.NONE);
		menuLaporanCashFlow.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_text.png"));
		menuLaporanCashFlow.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		menuLaporanCashFlow.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		menuLaporanCashFlow.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		menuLaporanCashFlow.setText("Cash Flow");
		
		CLabel menuLapPengeluaran = new CLabel(cmpMenuLaporan, SWT.NONE);
		menuLapPengeluaran.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_text.png"));
		menuLapPengeluaran.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		menuLapPengeluaran.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		menuLapPengeluaran.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		menuLapPengeluaran.setText("Pengeluaran");
		
		CLabel menuLaporanPembayaran = new CLabel(cmpMenuLaporan, SWT.NONE);
		menuLaporanPembayaran.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_text.png"));
		menuLaporanPembayaran.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		menuLaporanPembayaran.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		menuLaporanPembayaran.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		menuLaporanPembayaran.setText("Pembayaran");
		
		CLabel menuLaporanPegawai = new CLabel(cmpMenuLaporan, SWT.NONE);
		menuLaporanPegawai.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDown(MouseEvent arg0) {
				menuLaporanPegawaiClicked(arg0);
			}
		});
		menuLaporanPegawai.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/page_white_text.png"));
		menuLaporanPegawai.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		menuLaporanPegawai.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		menuLaporanPegawai.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		menuLaporanPegawai.setText("Pegawai");

		ExpandItem expandMenuSetting = new ExpandItem(expandBar, SWT.NONE);
		expandMenuSetting.setImage(SWTResourceManager.getImage(MainWindowCourse.class, "/images/form/help.png"));
		expandMenuSetting.setExpanded(true);
		expandMenuSetting.setText("Setting");

		Composite cmpMenuSetting = new Composite(expandBar, SWT.NONE);
		expandMenuSetting.setControl(cmpMenuSetting);
		expandMenuSetting.setHeight(90);
		GridLayout gl_cmpMenuSetting = new GridLayout(1, false);
		gl_cmpMenuSetting.marginRight = 5;
		gl_cmpMenuSetting.marginLeft = 5;
		gl_cmpMenuSetting.marginHeight = 1;
		gl_cmpMenuSetting.marginWidth = 1;
		cmpMenuSetting.setLayout(gl_cmpMenuSetting);

		CLabel lblNewLabel_3 = new CLabel(cmpMenuSetting, SWT.NONE);
		lblNewLabel_3.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_3.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_3.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_delete.png"));
		lblNewLabel_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_3.setText("Info Perusahaan");

		CLabel lblNewLabel_4 = new CLabel(cmpMenuSetting, SWT.NONE);
		lblNewLabel_4.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_4.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_4.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_save.png"));
		lblNewLabel_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_4.setText("Backup Database");

		CLabel lblNewLabel_5 = new CLabel(cmpMenuSetting, SWT.NONE);
		lblNewLabel_5.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
		lblNewLabel_5.setBackground(SWTResourceManager
				.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		lblNewLabel_5.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		lblNewLabel_5.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1));
		lblNewLabel_5.setText("Restore");

		Composite mainComposite = new Composite(sashForm, SWT.NONE);
		mainComposite.setLayout(new FormLayout());

		tabFolderMain = new CTabFolder(mainComposite, SWT.BORDER);
		FormData fd_tabFolderMain = new FormData();
		fd_tabFolderMain.left = new FormAttachment(0);
		fd_tabFolderMain.right = new FormAttachment(100);
		fd_tabFolderMain.top = new FormAttachment(0);
		tabFolderMain.setLayoutData(fd_tabFolderMain);
		tabFolderMain.setSelectionBackground(Display.getCurrent()
				.getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));

		tabListMain = new CTabItem(tabFolderMain, SWT.NONE);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("List");

		tabFormMain = new CTabItem(tabFolderMain, SWT.NONE);
		tabFormMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/application_form.png"));
		tabFormMain.setText("Form");
		
		Browser browser = new Browser(tabFolderMain, SWT.NONE);
		//browser.setUrl("D:\\JAVASCRIPT_ORG_CHART\\Org_Chart.html");
		browser.setText("<html>" +
			  "<head>" +
		   " <script type='text/javascript' src='https://www.google.com/jsapi'></script>" +
		   " <script type='text/javascript'>" +
		    "  google.load('visualization', '1', {packages:['orgchart']});" +
		    "  google.setOnLoadCallback(drawChart);" +
		    "  function drawChart() {" +
		     "   var data = new google.visualization.DataTable();" +
		     "   data.addColumn('string', 'Name');" +
		      "  data.addColumn('string', 'Manager');" +
		      "  data.addColumn('string', 'ToolTip');" +
		       " data.addRows([" +
		        "  [{v:'Mike', f:'Mike<div style=\"color:red; font-style:italic\">President</div>'}, '', 'The President']," +
		        "  [{v:'Jim', f:'Jim<div style=\"color:red; font-style:italic\">Vice President</div>'}, 'Mike', 'VP']," +
		        "  ['Alice', 'Mike', '']," +
				 " ['Putu', 'Mike', '']," +
				 "  ['Febrianto Lukas', 'Mike', '']," +
		        "  ['Bob', 'Jim', 'Bob Sponge']," +
				 " ['Handayani', 'Jim', 'Hand Sponge']," +
				"  ['Wati Sukawati', 'Jim', 'Wati Sukawati']," +
		        "  ['Carol', 'Bob', '']" +
		       " ]);" +
		      "  var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));" +
		      "  chart.draw(data, {allowHtml:true});" +
		     " }" +
		  "  </script>" +
		 " </head>" +

		 " <body>" +
		 "   <div id='chart_div'></div>" +
		"  </body>" +
		"</html>");
	tabFormMain.setControl(browser);

		TabFolder tabFolder = new TabFolder(mainComposite, SWT.NONE);
		fd_tabFolderMain.bottom = new FormAttachment(tabFolder, -6);
		FormData fd_tabFolder = new FormData();
		fd_tabFolder.top = new FormAttachment(100, -58);
		fd_tabFolder.bottom = new FormAttachment(100, 4);
		fd_tabFolder.right = new FormAttachment(100);
		fd_tabFolder.left = new FormAttachment(0);
		tabFolder.setLayoutData(fd_tabFolder);
		
		TabItem tbtmTips = new TabItem(tabFolder, SWT.NONE);
		tbtmTips.setText("Tips");
		
		StyledText styledText = new StyledText(tabFolder, SWT.BORDER);
		tbtmTips.setControl(styledText);
		styledText.setText("Gunakan tombol Add untuk menambah data baru, Gunakan tombol Edit untuk mengubah data, sebelumnya pilih data yang akan di Edit. Gunakan tombol Delete untuk menghapus data.\r\n");

		TabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);
		tbtmNewItem.setText("Tips");
		sashForm.setWeights(new int[] { 1, 4 });

		Menu menu = new Menu(this, SWT.BAR);
		setMenuBar(menu);

		MenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);
		mntmFile.setText("File");

		Menu menu_1 = new Menu(mntmFile);
		mntmFile.setMenu(menu_1);

		MenuItem mntmExit = new MenuItem(menu_1, SWT.NONE);
		mntmExit.setText("Exit");

		MenuItem mntmHelp = new MenuItem(menu, SWT.CASCADE);
		mntmHelp.setText("Help");

		Menu menu_2 = new Menu(mntmHelp);
		mntmHelp.setMenu(menu_2);

		MenuItem mntmHelpContent = new MenuItem(menu_2, SWT.NONE);
		mntmHelpContent.setText("Help Content");

		MenuItem mntmAbout = new MenuItem(menu_2, SWT.NONE);
		mntmAbout.setText("About");

		Composite composite_9 = new Composite(this, SWT.NONE);
		composite_9.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
		composite_9.setLayout(new GridLayout(2, false));
		GridData gd_composite_9 = new GridData(SWT.FILL, SWT.FILL, false,
				false, 1, 1);
		gd_composite_9.heightHint = 29;
		composite_9.setLayoutData(gd_composite_9);
		
		lblStatus1 = new Label(composite_9, SWT.NONE);
		lblStatus1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
		
		lblStatus2 = new Label(composite_9, SWT.NONE);
		lblStatus2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
		createContents();
	}



	protected void showMentor(MouseEvent arg0) {
		ListMentor lst = new ListMentor(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Daftar Mentor   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Data Master > Data Mentor");
	}

	protected void menuLaporanPegawaiClicked(MouseEvent arg0) {
		// TODO Auto-generated method stub
		PegawaiReport rpt = new PegawaiReport(this, SWT.NONE);
		rpt.open();
	}

	protected void linkCategoryClicked(MouseEvent arg0) {
		ListCategory lst = new ListCategory(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Produk Kursus   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Master Data > Paket Kursus");
	}

	protected void mnuCourseProductsClicked(MouseEvent arg0) {
		ListCoursePackage lst = new ListCoursePackage(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Produk Kursus   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Master Data > Paket Kursus");
	}

	protected void showCourseLevel(MouseEvent arg0) {
		ListCourseLevel lst = new ListCourseLevel(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Data Level Kursus   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Master Data > Level Kursus");
	}

	protected void showStudent() {
		ListStudent lst = new ListStudent(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Daftar Siswa   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Transaksi > Data Siswa");
	}

	protected void showEmployee(MouseEvent arg0) {
		ListPegawai lst = new ListPegawai(tabFolderMain, SWT.NONE);
		tabListMain.setControl(lst);
		tabListMain.setImage(SWTResourceManager.getImage(
				MainWindowCourse.class, "/images/form/database_add.png"));
		tabListMain.setText("Daftar Pegawai   ");
		tabFolderMain.setSelection(0);
		lblBreadCrumb.setText("Data Master > Data Pegawai");
	}

	/**
	 * Create contents of the shell.
	 */
	protected void createContents() {
		setText("Program Kursus");
	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}
}
